'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/api/login', controller.home.login);  //登录
  router.post('/api/register', controller.home.register);  //注册
  router.get('/api/buyHouse', controller.home.buyHouse);  //买房数据
  router.post('/api/buyCheck', controller.home.buyCheck);  //搜索买房数据
  router.get('/api/rentHouse', controller.home.rentHouse);  //租房数据
  router.post('/api/Detail', controller.home.Detail);  //详情数据
  router.post('/api/Detail2', controller.home.Detail2);  //租房详情数据
  router.post('/api/screening3', controller.home.screening3);  //户型筛选
  router.post('/api/rentScreening3', controller.home.rentScreening3);  //租房户型筛选
  router.post('/api/screening4', controller.home.screening4);  //朝向筛选
  router.post('/api/rentScreening4', controller.home.rentScreening4);  //租房朝向筛选
};
